<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            padding-bottom: 800px;
            padding-left: 30px;
        }
        ul{
            list-style: none;
            padding: 0px 0px;
            margin: 0px;
            width: 400px;
            border: 1px solid #999;
            margin-bottom: 20px;
        }
        ul li{
            padding: 8px 16px;
            display: flex;
            flex-flow: row nowrap;
            justify-content: space-between;
        }
        ul li:not(:last-child){
            border-bottom: 1px solid #999;
            
        }
    </style>
    <link rel="stylesheet" href="./0203.switchBtn.css">
</head>
<body>
    <div id="app">
        <h4>权限控制</h4>
        <ul>
            <li v-for="item in list">
                <span>{{ item }}</span>
                <switch-btn></switch-btn>
            </li>
        </ul>
        <h4>功能控制</h4>
        <ul>
            <li v-for="item in list2">
                <span>{{ item }}</span>
                <switch-btn></switch-btn>
            </li>
        </ul>
    </div>
    <script type="module">
        // 加载 Vue3 的ESM 模块文件
        import { createApp } from "../../assets/vue3/vue.esm-browser.js"
        import switchBtn from "./0203.switchBtn.js";
        createApp({
            data(){
                return {
                    list:[
                        "允许访问话筒",
                        "允许访问摄像头",
                        "允许访问相册",
                        "允许访问地址"
                    ],
                    list2:[
                        "开启闹钟",
                        "开启视频",
                        "开启蓝牙",
                        "开启定位"
                    ]
                }
            },
            components: {
                "switch-btn":switchBtn
            },
        }).mount("#app")
    </script>
</body>
</html>